<template>
  <a-card :bordered="false">
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchList">
        <a-row :gutter="48">
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="ID搜索">
              <a-input v-model="queryParam.id" placeholder="ID搜索" allow-clear />
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="波段">
              <a-select v-model="queryParam.bands" placeholder="请选择" default-value="all">
                <a-select-option value="">全部</a-select-option>
                <a-select-option v-for="(item, index) in bandsList" :key="index" :value="item.attribname">{{ item.attribname }}</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="搜索款号">
              <a-input v-model="queryParam.pcode" placeholder="搜索款号" allow-clear />
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="品牌">
              <a-select v-model="queryParam.brand" placeholder="请选择" show-search :filter-option="filterOption">
                <a-select-option value="">全部</a-select-option>
                <a-select-option :value="item.code" v-for="item in brandList" :key="item.code">
                  {{ item.name }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="年份" has-feedback>
              <a-date-picker
                mode="year"
                style="width: 100%"
                placeholder="请选择年份"
                format="YYYY"
                v-model="queryParam.year"
                :open="yearShowOne"
                @change="handChange"
                @openChange="openChangeOne"
                @panelChange="panelChangeOne"
              />
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="季节">
              <a-select v-model="queryParam.season" placeholder="请选择">
                <a-select-option :value="item.code" v-for="(item, index) in season" :key="index"> {{ item.name }} </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="搭配师">
              <a-select v-model="queryParam.fashionerId" placeholder="请选择" show-search :filter-option="filterOption">
                <a-select-option value="">全部</a-select-option>
                <a-select-option :value="item.code" v-for="item in fashionerList" :key="item.code">
                  {{ item.name }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="风格标签">
              <a-select v-model="queryParam.styleInfo" placeholder="请选择" mode="tags" show-search :filter-option="filterOption">
                <a-select-option :value="item.code" v-for="item in styleList" :key="item.code">
                  {{ item.title }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="场景标签">
              <a-select v-model="queryParam.sceneInfo" placeholder="请选择" mode="tags" show-search :filter-option="filterOption">
                <a-select-option :value="item.code" v-for="item in sceneList" :key="item.code">
                  {{ item.title }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="7" :lg="12" :sm="24">
            <a-form-item label="创建时间" has-feedback>
              <a-range-picker style="width: 100%" valueFormat="YYYY-MM-DD" showToday format="YYYY-MM-DD" v-model="queryParam.createTime" />
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="状态">
              <a-select v-model="queryParam.status" placeholder="请选择">
                <a-select-option value="">全部</a-select-option>
                <a-select-option :value="1">上架</a-select-option>
                <a-select-option :value="0">下架</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="评级">
              <a-select v-model="queryParam.level" placeholder="请选择" show-search :filter-option="filterOption">
                <a-select-option value="99">未评级</a-select-option>
                <a-select-option value="10">S</a-select-option>
                <a-select-option value="20">A</a-select-option>
                <a-select-option value="30">B</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="商品大类">
              <a-select v-model="queryParam.bigCateIds" placeholder="请选择" show-search :filter-option="filterOption" @change="changeGood">
                <a-select-option :value="item.key" v-for="item in categoryTrees" :key="item.key">
                  {{ item.name }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :xxl="6" :xl="6" :lg="12" :sm="24">
            <a-form-item label="商品小类">
              <a-select v-model="queryParam.smallCateIds" placeholder="请选择" show-search :filter-option="filterOption">
                <a-select-option :value="item.key" v-for="item in scategorys" :key="item.key">
                  {{ item.name }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :md="24" :sm="24">
            <span class="table-page-search-submitButtons" :style="{ float: 'left', overflow: 'hidden' }">
              <a-button type="primary" @click="addList">新增</a-button>
              <a-button style="margin-left: 8px" type="primary" @click="frameClick(1)">上架</a-button>
              <a-button style="margin-left: 8px" type="primary" @click="frameClick(0)">下架</a-button>
              <a-button type="primary" style="margin-left: 8px" @click="handleImportXls">导入</a-button>
            </span>
            <span class="table-page-search-submitButtons" :style="{ float: 'right', overflow: 'hidden' }">
              <a-button type="primary" @click="searchList">查询</a-button>
              <a-button style="margin-left: 8px" @click="resetList">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
      <s-table
        ref="table"
        size="default"
        :rowKey="record => record.bFashionerMatch.id"
        :columns="columns"
        :data="loadData"
        :rowSelection="rowSelection"
        :pagination="paginationProps"
        :scroll="{ x: 2000 }"
      >
        <span slot="showImage" slot-scope="record">
          <img class="img" :src="record.gallList[0].url" alt="" v-if="record.gallList && record.gallList.length > 0" />
        </span>
        <span slot="createTime" slot-scope="record">
          {{ record.bFashionerMatch.createTime }}
        </span>
        <span slot="productImage" slot-scope="text, record">
          <a-skeleton :loading="skeLoading" :paragraph="false">
            <div v-if="record.productList && record.productList.length <= 5">
              <div v-for="(product, index) in record.productList" :key="index" class="like-theme" @click="handleDetails(product.skc)">
                <a-tooltip placement="top">
                  <template slot="title">
                    <span>{{ product.skc }}</span>
                  </template>
                  <img class="img" :src="product.extendJson.productImage" alt="" />
                </a-tooltip>
              </div>
            </div>
            <a-carousel arrows :dots="false" :slidesToShow="5" style="margin-left: 30px" :slidesToScroll="5" :infinite="false" v-if="record.productList && record.productList.length > 5">
              <div slot="prevArrow" class="custom-slick-arrow" style="left: 10px">
                <a-icon type="left" />
              </div>
              <div slot="nextArrow" class="custom-slick-arrow" style="right: 10px">
                <a-icon type="right" />
              </div>
              <div class="like-theme" v-for="product in record.productList" :key="product.id" @click="handleDetails(product.skc)">
                <a-tooltip placement="top">
                  <template slot="title">
                    <span>{{ product.skc }}</span>
                  </template>
                  <img class="img" :src="product.extendJson.productImage" alt="" />
                </a-tooltip>
              </div>
            </a-carousel>
          </a-skeleton>
        </span>
        <span slot="tag" slot-scope="record">
          <a-tag style="margin: 2px" color="blue" v-for="label in record.labelList" :key="label.labelId">
            {{ label.labelName }}
          </a-tag>
        </span>
        <span slot="level" slot-scope="record">{{ record.level | isMuilt }} </span>
        <span slot="ID" slot-scope="record">
          {{ record.bFashionerMatch.id }}
        </span>
        <span slot="status" slot-scope="record">
          <span v-if="record.bFashionerMatch.status === 1">上架</span>
          <span v-if="record.bFashionerMatch.status === 0">下架</span>
        </span>
        <span slot="action" slot-scope="record">
          <a @click="handleAddAndEdit(record.bFashionerMatch.id)">编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm title="确定上架吗?" ok-text="Yes" cancel-text="No" @confirm="handleUpOrDown(1, record.bFashionerMatch.id)" v-if="record.bFashionerMatch.status === 0">
            <a>上架</a>
          </a-popconfirm>
          <a-popconfirm title="确定下架吗?" ok-text="Yes" cancel-text="No" @confirm="handleUpOrDown(0, record.bFashionerMatch.id)" v-if="record.bFashionerMatch.status === 1">
            <a>下架</a>
          </a-popconfirm>

          <a-divider type="vertical" />
          <a-popconfirm title="确定删除？" @confirm="handleMatchDelete(record.bFashionerMatch.id)">
            <a-icon slot="icon" type="question-circle-o" style="color: red" />
            <a href="javascript:;">删除</a>
          </a-popconfirm>
          <a-divider type="vertical" />
          <a @click="handleLog(record.bFashionerMatch.id)">日志</a>
          <a-divider type="vertical" />
          <a-popover title="Title">
            <template slot="content">
              <p>/pages/collocation/detail/index?id={{ record.bFashionerMatch.id }}</p>
            </template>
            <a href="javascript:;"> 小程序 </a>
          </a-popover>
        </span>
      </s-table>
    </div>
    <Log :logVisible.sync="logVisible" ref="log"></Log>
    <a-modal v-model="visible" width="700px" :footer="null" title="商品详情" @cancel="visible = false">
      <div class="details-wrapper">
        <img class="main-img" :src="productDetails.imgurl" alt="" v-if="productDetails" />
        <div class="text">
          <div class="t">款号：{{ productDetails.name }}</div>
          <div class="t">品名：{{ productDetails.value }}</div>
          <div class="t">年份：{{ productDetails.year }}</div>
          <div class="t">波段：{{ productDetails.band }}</div>
          <div class="t">品牌：{{ productDetails.brand }}</div>
          <div class="t">大类：{{ productDetails.bigClass }}</div>
          <div class="t">小类：{{ productDetails.smallClass }}</div>
        </div>
      </div>
    </a-modal>
    <j-import-modal ref="importModal" :url="getImportUrl()" :uploadParams="getUploadParams()" @ok="importOk" :serviceId="20" :templateUrl="templateUrl()"></j-import-modal>
  </a-card>
</template>
<script>
import { addCondition, matchList, upOrDown, matchDelete, goodsSkcDetail, getSizeNos } from '@/api/box/boxLook'
import { queryDim } from '@/api/box/workbench'
import { queryUploadSuccess } from '@/components/qiniuUpload/common'
import moment from 'moment'
import { STable } from '../components'
import Log from './components/Log'
import JImportModal from '@/components/qiniuUpload/JImportModal'
import globalData from '@/assets/js/common'
// import { importMixin } from '@/mixins/JeecgListMixin'
import { querySysCateTree } from '@api/box/api'
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
let bandList = []
for (let j = 1; j < 13; j++) {
  bandList.push(j)
}
const columns = [
  {
    title: 'ID',
    width: 200,
    scopedSlots: { customRender: 'ID' }
  },
  {
    title: '名称',
    width: 150,
    dataIndex: 'name'
  },
  {
    title: '效果图',
    width: 100,
    scopedSlots: { customRender: 'showImage' }
  },
  {
    title: '商品',
    width: 400,
    scopedSlots: { customRender: 'productImage' }
  },
  {
    title: '状态',
    width: 100,
    scopedSlots: { customRender: 'status' }
  },
  {
    title: '评级',
    width: 100,
    scopedSlots: { customRender: 'level' }
  },
  {
    title: '标签',
    width: 300,
    scopedSlots: { customRender: 'tag' }
  },

  {
    title: '搭配师',
    width: 100,
    dataIndex: 'publisherName'
  },
  {
    title: '创建人',
    width: 120,
    dataIndex: 'createBy'
  },
  {
    title: '创建时间',
    width: 220,

    scopedSlots: { customRender: 'createTime' }
  },
  {
    title: '操作',
    width: 150,
    align: 'center',
    fixed: 'right',
    scopedSlots: { customRender: 'action' }
  }
]

export default {
  // mixins: [JeecgListMixin],
  components: {
    STable,
    Log,
    JImportModal
  },
  data() {
    return {
      bandList,
      categoryTrees: [],
      scategorys: [],
      styleList: [],
      sceneList: [],
      season: [],
      url: {
        importExcelUrl: 'gateway/api/admin/styling/importExcel'
      },
      queryParam: {
        type: 1, // 有搭搭配
        searchType: 1,
        styleInfo: [],
        sceneInfo: [],
        smallCateIds: ''
      },
      bandsList: [],
      productDetails: {
        name: '',
        value: '',
        year: '',
        band: '',
        brand: '',
        bigClass: '',
        smallClass: ''
      },
      visible: false,
      logVisible: false,
      columns,
      paginationProps: {
        total: 0,
        showTotal: total => `共有 ${total} 条数据`
        // onShowSizeChange: (current, pageSize) => this.changePageSize(current, pageSize)
      },

      // 加载数据方法 必须为 Promise 对象
      loadData: parameter => {
        this.skeLoading = true
        let queryParam = JSON.parse(JSON.stringify(this.queryParam))
        if (queryParam.bigCateIds) {
          queryParam.bigCateIds = queryParam.bigCateIds.split(',')
        }

        if (queryParam.bands) {
          queryParam.bands = queryParam.bands.toString()
          queryParam.bands = queryParam.bands.split(',')
        } else {
          queryParam.bands = []
        }
        if (queryParam.smallCateIds && queryParam.smallCateIds.length > 0) {
          queryParam.smallCateIds = queryParam.smallCateIds.toString()
          queryParam.smallCateIds = queryParam.smallCateIds.split(',')
        } else {
          queryParam.smallCateIds = []
        }
        if (queryParam.styleInfo) {
          queryParam.labelCodes = queryParam.styleInfo
        }
        if (queryParam.sceneInfo) {
          queryParam.labelCodes = queryParam.sceneInfo
        }
        if (queryParam.sceneInfo && queryParam.styleInfo) {
          queryParam.labelCodes = [...queryParam.styleInfo, ...queryParam.sceneInfo]
        }
        if (queryParam.createTime && queryParam.createTime.length > 0) {
          queryParam.createTimeBegin = queryParam.createTime[0]
          queryParam.createTimeEnd = queryParam.createTime[1]
        }
        delete queryParam.createTime
        delete queryParam.styleInfo
        delete queryParam.sceneInfo

        const data = {
          page: parameter,
          requestData: {
            ...queryParam
          }
        }

        return matchList(data).then(res => {
          if (res.code === 0) {
            const data = res
            if (data.data) {
              data.data.forEach(item => {
                item.productList.forEach(info => {
                  info.extendJson = JSON.parse(info.extendJson)
                })
                item.gallList = item.galleryList && item.galleryList.length > 0 ? item.galleryList.filter(item => item.type == 0) : []
              })
            }
            this.skeLoading = false
            return data
          } else {
            this.$message.error(res.msg)
            const data = {
              page: {
                pageNo: 0
              },
              data: []
            }
            this.skeLoading = false
            return data
          }
        })
      },
      selectedRowKeys: [],
      brandList: [],
      fashionerList: [],
      yearShowOne: false,
      skeLoading: true
    }
  },
  filters: {
    isMuilt(value) {
      if (value == 99) {
        return '未评级'
      } else if (value == 10) {
        return 'S'
      } else if (value == 20) {
        return 'A'
      } else if (value == 30) {
        return 'B'
      } else {
        return ''
      }
    }
  },
  created() {
    this.getCondition()
    this.postQueryDim()
    this.getSysCateTree()
    this.getSize()
  },
  computed: {
    rowSelection() {
      return {
        selectedRowKeys: this.selectedRowKeys,
        onChange: this.onSelectChange
      }
    }
  },
  watch: {
    $route(to, from) {
      if (from.path.includes('/box/boxLook/edit') && to.path == '/box/boxLook/match') {
        this.$refs.table.refresh()
      } else if (from.path == '/box/boxLook/match' && !to.path.includes('/box/boxLook/edit')) {
        this.$destroy()
      } else if (!from.path.includes('/box/boxLook/edit') && to.path == '/box/boxLook/match') {
        this.resetList()
      }
    }
  },
  methods: {
    addList() {
      this.$router.push(`/box/boxLook/edit/${'add'}`)
    },
    changeGood(value) {
      console.log(value, 'value')
      let scategorys = this.categoryTrees.filter(e => e.key == value)
      this.scategorys = scategorys[0].childCategory
      this.queryParam.smallCateIds = []
    },
    // 上传成功后的方法
    importOk(result, fileList) {
      console.log(fileList, 'fileList')
      let that = this
      queryUploadSuccess(this.timer, result, 60000, function (x, data) {
        console.log(x, data)
        if (x == 'done' || x == 'warning') {
          that.$refs.importModal.close()
        }
        // if (data.url.includes(';')) {
        //   let arr = data.url.split(';')
        //   that.$refs.importResult.show(arr)
        // this.$message.success('导入成功！')
        // }
      })
    },
    // 导入
    handleImportXls() {
      this.$refs.importModal.show()
    },
    // 处理上传业务的后台地址
    getImportUrl() {
      return ''
    },
    getUploadParams() {
      // console.log({...globalData.uploadParams})
      return { ...globalData.uploadParams }
    },
    templateUrl() {
      return 'https://img.bzhz.jnbygroup.com/importExcelTemp.xlsx'
    },

    portClick() {},
    frameClick(type) {
      if (!this.selectedRowKeys.length) {
        this.$message.warning('请选择')
        return
      }
      const data = {
        requestData: {
          ids: this.selectedRowKeys,
          type: type // :1上架，0下架
        }
      }
      upOrDown(data).then(res => {
        if (res.code == 0) {
          this.selectedRowKeys = []
          this.$refs.table.refresh()
        } else {
          this.$message.warning(res.msg)
        }
      })
    },

    handleLog(id) {
      this.$refs.log.getLog(id, 'parent')
      this.logVisible = true
    },
    filterFields(values) {
      const formValue = {}
      Object.keys(values).forEach(i => {
        if (values[i] !== '' && values[i] !== undefined && values[i] !== null) {
          if (i === 'createTime') {
            formValue.createTimeBegin = values[i][0]
            formValue.createTimeEnd = values[i][1]
          } else {
            formValue[i] = values[i]
          }
        }
      })
      return formValue
    },
    getCondition() {
      addCondition().then(res => {
        if (res.code === 0) {
          const { arcBrand, fashioner } = res.data
          this.brandList = arcBrand
          this.fashionerList = fashioner
        } else {
          this.$message.error(res.data.msg)
        }
      })
    },
    postQueryDim() {
      queryDim().then(res => {
        if (res.code === 0) {
          // this.scategorys = res.data.scategorys
          this.categoryTrees = res.data.categoryTrees
          this.bandsList = res.data.bandsV2
        } else {
          this.$message.error(res.data.msg)
        }
      })
    },
    getSize() {
      getSizeNos().then(res => {
        if (res.code === 0) {
          console.log(res, 'res')
          this.season = res.data[3].children
        } else {
          this.$message.error()
        }
      })
    },
    getSysCateTree() {
      querySysCateTree('B08')
        .then(res => {
          const { code, result, message } = res
          if (code == 0) {
            let data = result
            this.styleList = data[0].children
            this.sceneList = data[3].children
          } else {
            this.$message.error(message)
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    onSelectChange(selectedRowKeys) {
      this.selectedRowKeys = selectedRowKeys
    },
    filterOption(input, option) {
      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
    },
    searchList() {
      // this.queryParam = this.filterFields(this.queryParam)
      this.$refs.table.refresh(true)
    },
    resetList() {
      this.queryParam = {
        type: '1',
        searchType: '1',
        styleInfo: [],
        sceneInfo: [],
        smallCateIds: ''
      }
      this.scategorys = []
      this.$refs.table.refresh()
    },
    handleMatchDelete(id) {
      matchDelete(id).then(res => {
        if (res.code == 0) {
          this.$refs.table.refresh()
        } else {
          this.$message.warning(res.msg)
        }
      })
    },
    /* 导入 */
    handleImportExcel(info) {
      if (info.file.status !== 'uploading') {
        console.log(info.file, info.fileList)
      }
      if (info.file.status === 'done') {
        if (info.file.response.success) {
          // this.$message.success(`${info.file.name} 文件上传成功`);
          if (info.file.response.code === 201) {
            let {
              message,
              result: { msg, fileUrl, fileName }
            } = info.file.response
            let href = window._CONFIG['domianURL'] + fileUrl
            this.$warning({
              title: message,
              content: (
                <div>
                  <span> {msg} </span>
                  <br />
                  <span>
                    {' '}
                    具体详情请{' '}
                    <a href={href} target="_blank" download={fileName}>
                      {' '}
                      点击下载{' '}
                    </a>{' '}
                  </span>
                </div>
              )
            })
          } else {
            this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
          }
          this.loadData()
        } else {
          this.$message.error(`${info.file.name} ${info.file.response.message}.`)
        }
      } else if (info.file.status === 'error') {
        if (info.file.response.status === 500) {
          let data = info.file.response
          const token = Vue.ls.get(ACCESS_TOKEN)
          if (token && data.message.includes('Token失效')) {
            Modal.error({
              title: '登录已过期',
              content: '很抱歉，登录已过期，请重新登录',
              okText: '重新登录',
              mask: false,
              onOk: () => {
                store.dispatch('Logout').then(() => {
                  Vue.ls.remove(ACCESS_TOKEN)
                  window.location.reload()
                })
              }
            })
          }
        } else {
          this.$message.error(`文件上传失败: ${info.file.msg} `)
        }
      }
    },
    // 弹出日历和关闭日历的回调
    openChangeOne(status) {
      this.yearShowOne = status
    },

    handChange() {
      this.queryParam.year = null
    },
    // 得到年份选择器的值
    panelChangeOne(value) {
      this.queryParam.year = moment(value).format('YYYY')
      this.yearShowOne = false
    },
    handleDetails(item) {
      console.log(item, 'item')
      const colorNo = item.substring(item.length - 3)
      const productCode = item.substring(0, item.length - 3)
      this.productDetails = {}
      this.visible = true
      const data = {
        requestData: {
          colorNo,
          productCode
        }
      }
      goodsSkcDetail(data).then(res => {
        if (res.code == 0) {
          if (res.data) {
            this.productDetails = res.data
          }
        } else {
          this.$message.warning(res.msg)
        }
      })
    },
    handleAddAndEdit(id) {
      this.$router.push(`/box/boxLook/edit/${id}`)
    },
    handleUpOrDown(type, ids) {
      const data = {
        requestData: {
          ids: [ids],
          type: type // :1上架，0下架
        }
      }
      upOrDown(data).then(res => {
        if (res.code == 0) {
          this.$refs.table.refresh()
        } else {
          this.$message.warning(res.msg)
        }
      })
    }
  }
}
</script>
<style lang="less" scoped>
.show-img {
  display: block;
  width: 100%;
}
.details-wrapper {
  display: flex;
  padding-bottom: 40px;
  .main-img {
    display: block;
    width: 40%;
  }
  .text {
    flex: 1;
    margin-left: 10%;
    line-height: 35px;
    font-size: 14px;
  }
}
.id-wrapper {
  font-size: 12px;
  text-align: center;
  span {
    color: #999;
  }
}
.product-img {
  font-size: 12px;
  .img-item {
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
    text-align: center;
  }
}
.time {
  font-size: 12px;
  color: #999;
}
.img {
  display: block;
  margin: 2px auto;
  width: 60px;
  height: 60px;
  border: 1px dashed #f5f5f5;
  object-fit: scale-down;
  cursor: pointer;
}
.like-theme {
  position: relative;
  display: inline-block;
  width: 54px !important;
  margin-right: 8px;
  p {
    text-align: center;
    position: absolute;
    bottom: -2px;
    width: 54px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 12px;
  }
  .imgs {
    padding: 4px;
  }
}
.imgs {
  width: 60px !important;
  height: 60px !important;
  object-fit: scale-down;
  padding: 10px;
  // border: 1px solid #cdcdcd;
  margin-right: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  margin-top: 8px;
}
.ant-carousel {
  margin-top: 6px;
  width: 320px;
  .carousel-imgs {
    height: 100px;
    overflow: hidden;
    height: 54px;
    img {
      width: 60px;
      height: 60px;
      margin: 0 auto;
    }
  }

  .dots-imgs {
    width: 50px;
    height: 50px;
    border: 1px solid #cdcdcd;
    padding: 5px;
    object-fit: scale-down;
  }
  .slick-next::before {
    content: '';
  }
  .slick-prev::before {
    content: '';
  }
  /deep/ .slick-prev {
    left: -30px !important;
    top: 50% !important;
    .anticon {
      font-size: 16px;
    }
  }
  /deep/ .slick-next {
    right: -30px !important;
    top: 50% !important;
    .anticon {
      font-size: 16px;
    }
  }
  .custom-slick-arrow {
    width: 25px;
    height: 25px;
    font-size: 25px;
    color: rgb(116, 116, 116);
    background-color: transparent;
    opacity: 1;
    z-index: 2;
  }
  /deep/ .slick-dots-bottom {
    bottom: 50px;
    li {
      margin: 0 5px;
    }
  }
  /deep/.slick-disabled {
    color: #d9d9d9;
  }
}
</style>

